home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / sync / blackj11.zip / BLACKJ11.SRC < prev    next >
Text File  |  1996-03-11  |  24KB  |  854 lines

  1. # ┌──────────────────────────────────────────────────────────────────────────┐
  2. # │      BLACKJ11.SRC   (Chuckle Box BlackJack)                              │
  3. # │                                                                          │
  4. # │          Version:   1.1  (Released 11 Mar 1996) for SBBS 2.20 - Rev B    │
  5. # │           Author:   Robert Nykvist  aka  Chuckles@VERT                   │
  6. # │                                                                          │
  7. # │      Quick Start:   1.  Move BLACKJ11.SRC to your \EXEC directory.       │
  8. # │                     2.  Compile BLACKJ11.SRC with BAJA compiler.         │
  9. # │                     3.  You know best how and where to put the script.   │
  10. # │                                                                          │
  11. # │             NOTE:       This script WILL modify the BBS Log,             │
  12. # │                         and User Credit amounts.                         │
  13. # └──────────────────────────────────────────────────────────────────────────┘
  14.  
  15. # ┌─────────────────────────────────────┐
  16. # │ Let other nodes know where user is. │
  17. # └─────────────────────────────────────┘
  18. !include nodedefs.inc
  19.  
  20.  
  21. #┌──────────────────────────┐
  22. #│ Define Integer Variables │
  23. #└──────────────────────────┘
  24. int WINNINGS
  25. int CARD
  26. int COUNT
  27. int TOTAL
  28. int COUNT
  29.  
  30.  
  31. # ┌─────────────────────────────────────────────────────┐
  32. # │ Set WINNINGS to zero only upon entering the script. │
  33. # └─────────────────────────────────────────────────────┘
  34. set WINNINGS 0
  35.  
  36.  
  37. # ┌───────────────────────────────────────────────────────────┐
  38. # │ Top of Menu - Credit Check                                │
  39. # │ If user doesn't have 5 k Credits, send them on their way. │
  40. # └───────────────────────────────────────────────────────────┘
  41. :top
  42. compare_ars $C !5
  43.   if_true
  44.     print "\r\nrhSorry, you don't have enough credits play today.\r\n"
  45.     print "rhTry again tomorrow...n\r\n"
  46.     crlf
  47.     pause
  48.     goto byebye
  49.   end_if
  50.  
  51.  
  52. # ┌──────────────┐
  53. # │ Display Menu │
  54. # └──────────────┘
  55. cls
  56. print "  hw4    Score        Result    n\r\n
  57. print "n  ┌────────────┬────────────┐\r\n"
  58. print "  │   hm2 -  8   n│   hm-25 k    n│"
  59. print "             nhwChuckle Box BlackJackn\r\n
  60. print "  │   hm9 - 13   n│   hm-10 k    n│"
  61. print "                  hy Version 1.1n\r\n"
  62. print "  │  hg14 - 17   n│    hg+5 k    n│\r\n"
  63. print "  │  hg18 - 20   n│   hg+25 k    n│"
  64. print "            4hy Your Credits :w @BYTESLEFT@ n\r\n"
  65. print "  │ hyBlack Jack n│   hy+50 k    n│\r\n"
  66. print "  │   hrBusted   n│   hr-25 k    n│\r\n"
  67. print "  └────────────┴────────────┘n\r\n"
  68. crlf
  69.  
  70.  
  71. # ┌────────────────────────────────────────────────────────────┐
  72. # │ Note Node Location & make sure things are flowing in SYNC. │
  73. # └────────────────────────────────────────────────────────────┘
  74. node_action node_xtrn
  75. async
  76.  
  77.  
  78. # ┌────────────────┐
  79. # │ Display Prompt │
  80. # └────────────────┘
  81. mnemonics "  (~I)nfo, (~P)lay or (~Q)uit > "
  82.  
  83.  
  84. # ┌─────────────────────────────────────────┐
  85. # │ Get Key Input From User - ENTER allowed │
  86. # └─────────────────────────────────────────┘
  87. getkey IPQ?\R
  88.  
  89.  
  90. # ┌───────────────────────────┐
  91. # │ Display Instructions/Info │
  92. # └───────────────────────────┘
  93.   cmdkey I
  94.     cls
  95.     crlf
  96.     crlf
  97.       print "ònhChuckle Box BlackJack - Ver 1.1\r\n"
  98.       print "öyby Robert Nykvist (Copyright)1996\r\n"
  99.       crlf
  100.       crlf
  101.       print "ìnc     Each BlackJack hand costsihr 5 knc credits!\r\n"
  102.       print "ìncWhen you hHITnc, the hmcomputer ncwill deal you a card,\r\n"
  103.       print "ïand keep a running htotal ncof the value of your hHITsnc.\r\n"
  104.       crlf
  105.       print "ÜFace card = face value.\r\n"
  106.       print "önc Jack = hm11, ncQueen = 12, King = 13\r\n"
  107.       crlf
  108.       print "ìWhen you hSTOP nchitting, the computer will hmprocess\r\n"
  109.       print "ènc      credits according to the chart ncin the menu.\r\n"
  110.       crlf
  111.       print "âCredits can hbuy ncyou hmextra ncon-line time using the Time/Credit hmBanknc!n\r\n"
  112.     crlf
  113.     crlf
  114.     pause
  115.     goto top
  116.   end_cmd
  117.  
  118.  
  119. # ┌─────────────────────────────────────┐
  120. # │ Wipe out display Prompt and go Play │
  121. # └─────────────────────────────────────┘
  122.   cmdkey P
  123.     print "1Hn                                                  n\r\n"
  124.     goto play
  125.   end_cmd
  126.  
  127.  
  128. # ┌───────────────────────────────────┐
  129. # │ Wipe out display Prompt and Leave │
  130. # └───────────────────────────────────┘
  131.   cmdkey Q
  132.     print "1Hn                                                  n\r\n"
  133.     goto leave
  134.   end_cmd
  135. print "1Hn                                                  n\r\n"
  136.  
  137.  
  138. # ┌───────────────────────────────────────────┐
  139. # │ Hitting Enter or fallthrough goes to Play │
  140. # └───────────────────────────────────────────┘
  141. print "1Hn                                                  n\r\n"
  142. goto play
  143.  
  144.  
  145. # ┌──────────────────────────────────────────────────┐
  146. # │ Play BlackJack - Adjust Credits -5K for Ante,    │
  147. # │ Keep track of WINNINGS, Reset Integer variables. │
  148. # └──────────────────────────────────────────────────┘
  149. :play
  150. adjust_user_credits -5
  151. add WINNINGS -5
  152. set CARD 0
  153. set COUNT 0
  154. set TOTAL 0
  155.  
  156.  
  157. # ┌──────────────────────────────────────────────────┐
  158. # │ Switch/Case Loop using Integer Variable COUNT.   │
  159. # │ Purpose is to alter prompt colors after each hit │
  160. # │ while updating totals.  Easier for user to see.  │
  161. # │ Many ANSI sequences used to control placement.   │
  162. # └──────────────────────────────────────────────────┘
  163. :choosecard
  164. switch count
  165.   case 0
  166.     print "1H"
  167.     print "hcYour current score is: hm"
  168.     print TOTAL
  169.     print "1H"
  170.     print "                                         "
  171.     print "1H"
  172.     yes_no "Hit"
  173.       if_true
  174.         goto hit
  175.       else
  176.         goto stay
  177.       end_if
  178.   end_case
  179.   case 1
  180.     print "1H"
  181.     print "hyYour current score is: hc"
  182.     print TOTAL
  183.     print "1H"
  184.     print "                                         "
  185.     print "1H"
  186.     yes_no "Hit"
  187.       if_true
  188.         goto hit
  189.       else
  190.         goto stay
  191.       end_if
  192.   end_case
  193.   case 2
  194.     print "1H"
  195.     print "nmYour current score is: hy"
  196.     print TOTAL
  197.     print "1H"
  198.     print "                                         "
  199.     print "1H"
  200.     yes_no "Hit"
  201.       if_true
  202.         goto hit
  203.       else
  204.         goto stay
  205.       end_if
  206.   end_case
  207.   case 3
  208.     print "1H"
  209.     print "hcYour current score is: hm"
  210.     print TOTAL
  211.     print "1H"
  212.     print "                                         "
  213.     print "1H"
  214.     yes_no "Hit"
  215.       if_true
  216.         goto hit
  217.       else
  218.         goto stay
  219.       end_if
  220.   end_case
  221.   case 4
  222.     print "1H"
  223.     print "hgYour current score is: nc"
  224.     print TOTAL
  225.     print "1H"
  226.     print "                                         "
  227.     print "1H"
  228.     yes_no "Hit"
  229.       if_true
  230.         goto hit
  231.       else
  232.         goto stay
  233.       end_if
  234.   end_case
  235.   case 5
  236.     print "1H"
  237.     print "hmYour current score is: nc"
  238.     print TOTAL
  239.     print "1H"
  240.     print "                                         "
  241.     print "1H"
  242.     yes_no "Hit"
  243.       if_true
  244.         goto hit
  245.       else
  246.         goto stay
  247.       end_if
  248.   end_case
  249. end_switch
  250.  
  251.  
  252. # ┌────────────────────────────────────────┐
  253. # │ Player wants a Hit  (Draw Card)        │
  254. # │ Randomly choose 1-13 for CARD variable │
  255. # │ 0-12 becomes 1-13 by adding 1.         │
  256. # └────────────────────────────────────────┘
  257. :hit
  258. random CARD 12
  259. add CARD 1
  260.  
  261.  
  262. # ┌──────────────────────────────────────────────────────┐
  263. # │ Problem here is displaying cards with single digits  │
  264. # │ as compared to double digit cards, not to mention    │
  265. # │ a standard placement of each card for nice graphics. │
  266. # │ Making use of Switch/Case loop, again using COUNT,   │
  267. # │ and ANSI sequence codes to control placement.        │
  268. # └──────────────────────────────────────────────────────┘
  269. :displaycard
  270. switch count
  271.   case 0
  272.  
  273.  
  274. # ┌──────────────────────────────────────────────┐
  275. # │ Is the card two digit or single digit?       │
  276. # │ Double Digit card is one character wider...  │
  277. # │ That's the reason for this long case/if loop │
  278. # └──────────────────────────────────────────────┘
  279.   compare CARD 10
  280.     if_less
  281.  
  282.  
  283. # ┌──────────────────────────────────────────────┐
  284. # │ Display first card Hit on column 1  (1H)     │
  285. # │ This is assuming a 24 x 80 character screen. │
  286. # └──────────────────────────────────────────────┘
  287.       print "1H"
  288.       print "hb╒════════╕  "
  289.       print "1H"
  290.       print "b│    c "
  291.       print CARD
  292.       print "b │  "
  293.       print "1H"
  294.       print "b│        │  "
  295.       print "1H"
  296. # ┌─────────────────────────────────────────────┐
  297. # │ Letters CB?  Chuckle Box of course.  :)     │
  298. # │ Customize this script as you see fit.       │
  299. # │ But kindly give credit where credit is due. │
  300. # └─────────────────────────────────────────────┘
  301.       print "b│   CB   │  "
  302.       print "1H"
  303.       print "b│        │ "
  304.       print "1H"
  305.       print "b│ c"
  306.       print CARD
  307.       print "b     │  "
  308.       print "1H"
  309.       print "b╘════════╛  "
  310.       print "1H"
  311.       print "wThe card is a: g"
  312.       print CARD
  313.       print "      "
  314.    else
  315.       print "1H"
  316.       print "hb╒═════════╕  "
  317.       print "1H"
  318.       print "b│    c "
  319.       print CARD
  320.       print "b │  "
  321.       print "1H"
  322.       print "b│         │  "
  323.       print "1H"
  324.       print "b│   C B   │  "
  325.       print "1H"
  326.       print "b│         │  "
  327.       print "1H"
  328.       print "b│ c"
  329.       print CARD
  330.       print "b     │  "
  331.       print "1H"
  332.       print "b╘═════════╛  "
  333.       print "1H"
  334.       print "yThe card is a: c"
  335.       print CARD
  336.       print "        "
  337.     end_if
  338.   end_case
  339.   case 1
  340.   compare CARD 10
  341.     if_less
  342. # ┌─────────────────────────────────────────────┐
  343. # │ Display second card hit on column 15  (15H) │
  344. # └─────────────────────────────────────────────┘
  345.       print "15H"
  346.       print "hb╒════════╕  "
  347.       print "15H"
  348.       print "b│    c "
  349.       print CARD
  350.       print "b │  "
  351.       print "15H"
  352.       print "b│        │  "
  353.       print "15H"
  354.       print "b│   CB   │  "
  355.       print "15H"
  356.       print "b│        │ "
  357.       print "15H"
  358.       print "b│ c"
  359.       print CARD
  360.       print "b     │  "
  361.       print "15H"
  362.       print "b╘════════╛  "
  363.       print "1H"
  364.       print "wThe card is a: g"
  365.       print CARD
  366.       print "      "
  367.     else
  368.       print "15H"
  369.       print "hb╒═════════╕  "
  370.       print "15H"
  371.       print "b│     c"
  372.       print CARD
  373.       print "b │  "
  374.       print "15H"
  375.       print "b│         │  "
  376.       print "15H"
  377.       print "b│   C B   │  "
  378.       print "15H"
  379.       print "b│         │  "
  380.       print "15H"
  381.       print "b│ c"
  382.       print CARD
  383.       print "b     │  "
  384.       print "15H"
  385.       print "b╘═════════╛  "
  386.       print "1H"
  387.       print "yThe card is a: c"
  388.       print CARD
  389.       print "        "
  390.     end_if
  391.   end_case
  392.   case 2
  393.   compare CARD 10
  394.     if_less
  395. # ┌────────────────────────────────────────────┐
  396. # │ Display third card hit on column 30  (30H) │
  397. # └────────────────────────────────────────────┘
  398.       print "30H"
  399.       print "hb╒════════╕  "
  400.       print "30H"
  401.       print "b│    c "
  402.       print CARD
  403.       print "b │  "
  404.       print "30H"
  405.       print "b│        │  "
  406.       print "30H"
  407.       print "b│   CB   │  "
  408.       print "30H"
  409.       print "b│        │ "
  410.       print "30H"
  411.       print "b│c "
  412.       print CARD
  413.       print "b     │  "
  414.       print "30H"
  415.       print "b╘════════╛  "
  416.       print "1H"
  417.       print "wThe card is a: g"
  418.       print CARD
  419.       print "      "
  420.     else
  421.       print "30H"
  422.       print "hb╒═════════╕  "
  423.       print "30H"
  424.       print "b│     c"
  425.       print CARD
  426.       print "b │  "
  427.       print "30H"
  428.       print "b│         │  "
  429.       print "30H"
  430.       print "b│   C B   │  "
  431.       print "30H"
  432.       print "b│         │  "
  433.       print "30H"
  434.       print "b│ c"
  435.       print CARD
  436.       print "b     │  "
  437.       print "30H"
  438.       print "b╘═════════╛  "
  439.       print "1H"
  440.       print "yThe card is a: c"
  441.       print CARD
  442.       print "        "
  443.     end_if
  444.   end_case
  445.   case 3
  446.   compare CARD 10
  447.     if_less
  448. # ┌────────────────────────────────────────────┐
  449. # │ Display fourth card hit on column 45 (45H) │
  450. # └────────────────────────────────────────────┘
  451.       print "45H"
  452.       print "hb╒════════╕  "
  453.       print "45H"
  454.       print "b│    c "
  455.       print CARD
  456.       print "b │  "
  457.       print "45H"
  458.       print "b│        │  "
  459.       print "45H"
  460.       print "b│   CB   │  "
  461.       print "45H"
  462.       print "b│        │ "
  463.       print "45H"
  464.       print "b│ c"
  465.       print CARD
  466.       print "b     │  "
  467.       print "45H"
  468.       print "b╘════════╛  "
  469.       print "1H"
  470.       print "wThe card is a: g"
  471.       print CARD
  472.       print "      "
  473.     else
  474.       print "45H"
  475.       print "hb╒═════════╕  "
  476.       print "45H"
  477.       print "b│     c"
  478.       print CARD
  479.       print "b │  "
  480.       print "45H"
  481.       print "b│         │  "
  482.       print "45H"
  483.       print "b│   C B   │  "
  484.       print "45H"
  485.       print "b│         │  "
  486.       print "45H"
  487.       print "b│ c"
  488.       print CARD
  489.       print "b     │  "
  490.       print "45H"
  491.       print "b╘═════════╛  "
  492.       print "1H"
  493.       print "yThe card is a: c"
  494.       print CARD
  495.       print "        "
  496.     end_if
  497.   end_case
  498.   case 4
  499.   compare CARD 10
  500.     if_less
  501. # ┌────────────────────────────────────────────────────┐
  502. # │ Display fifth & last card pick on column 60  (60H) │
  503. # └────────────────────────────────────────────────────┘
  504.       print "60H"
  505.       print "hb╒════════╕  "
  506.       print "60H"
  507.       print "b│    c "
  508.       print CARD
  509.       print "b │  "
  510.       print "60H"
  511.       print "b│        │  "
  512.       print "60H"
  513.       print "b│   CB   │  "
  514.       print "60H"
  515.       print "b│        │ "
  516.       print "60H"
  517.       print "b│c "
  518.       print CARD
  519.       print "b     │  "
  520.       print "60H"
  521.       print "b╘════════╛  "
  522.       print "1H"
  523.       print "wThe card is a: g"
  524.       print CARD
  525.       print "      "
  526.     else
  527.       print "60H"
  528.       print "hb╒═════════╕  "
  529.       print "60H"
  530.       print "b│     c"
  531.       print CARD
  532.       print "b │  "
  533.       print "60H"
  534.       print "b│         │  "
  535.       print "60H"
  536.       print "b│   C B   │  "
  537.       print "60H"
  538.       print "b│         │  "
  539.       print "60H"
  540.       print "b│ c"
  541.       print CARD
  542.       print "b     │  "
  543.       print "60H"
  544.       print "b╘═════════╛  "
  545.       print "1H"
  546.       print "yThe card is a: c"
  547.       print CARD
  548.       print "        "
  549.     end_if
  550.   end_case
  551. end_switch
  552.  
  553.  
  554. # ┌────────────────────────────────────────────────────────┐
  555. # │ COUNT is used to keep track of Hits or cards drawn.    │
  556. # │ After drawing a CARD, it is added to variable TOTAL.   │
  557. # └────────────────────────────────────────────────────────┘
  558. add COUNT 1
  559. add TOTAL CARD
  560.  
  561.  
  562. # ┌─────────────────────────────────────────────┐
  563. # │ There is a BONUS for those who draw 5 cards │
  564. # │ Checking for it BIG winners here.           │
  565. # └─────────────────────────────────────────────┘
  566. compare COUNT 5
  567.   if_true
  568.     goto bigtest
  569.   end_if
  570.  
  571.  
  572. # ┌───────────────────────────────┐
  573. # │ Checking TOTAL for Blackjack. │
  574. # └───────────────────────────────┘
  575. compare TOTAL 21
  576.   if_true
  577.     goto super
  578.   end_if
  579.  
  580.  
  581. # ┌───────────────────────────────────────────────────────┐
  582. # │ Is TOTAL less than 21?  See if they want another HIT. │
  583. # └───────────────────────────────────────────────────────┘
  584. compare TOTAL 21
  585.   if_less
  586.     goto choosecard
  587.   end_if
  588.  
  589.  
  590. # ┌─────────────────────────────────────┐
  591. # │ TOTAL over 21?  Oh Crap...  BUSTED. │
  592. # └─────────────────────────────────────┘
  593. compare TOTAL 21
  594.   if_greater
  595.     goto crap
  596.   end_if
  597.  
  598.  
  599. # ┌───────────────────────────────────────────────┐
  600. # │ When they don't want another HIT - they STAY. │
  601. # │ Now we have to determine what CREDIT action   │
  602. # │ to take based upon their card TOTAL.          │
  603. # │ See Menu for what TOTALs earn what CREDITS.   │
  604. # │ Free to customize the CREDIT structures.      │
  605. # │ Checking here for a TOTAL less than 8.        │
  606. # └───────────────────────────────────────────────┘
  607. :stay
  608. compare TOTAL 8
  609.   if_less_or_equal
  610.     goto losetwofive
  611.   else
  612.     goto testtwo
  613.   end_if
  614.  
  615.  
  616. # ┌─────────────────────────────────┐
  617. # │ TOTAL Less than 8?  Yikes!  -25 │
  618. # └─────────────────────────────────┘
  619. :losetwofive
  620. print "1H"
  621. print "hwYour total for this hand was: hb"
  622. print TOTAL
  623. print "   n\r\n"
  624. print "                                                           n\r\n"
  625. print "hmThe SysOp Chuckles as he snatches hr25 khm of your credits!n\r\n"
  626. print "1Hn                                                  n"
  627. pause
  628.  
  629.  
  630. # ┌────────────────────────────────────────────────────────────┐
  631. # │ Keeping constant updates on CREDITS, and overall WINNINGS. │
  632. # └────────────────────────────────────────────────────────────┘
  633. adjust_user_credits -25
  634. add WINNINGS -25
  635. goto top
  636.  
  637.  
  638. # ┌───────────────────────────────────┐
  639. # │ Checking for TOTAL between 9 & 13 │
  640. # └───────────────────────────────────┘
  641. :testtwo
  642. compare TOTAL 13
  643.   if_less_or_equal
  644.     goto loseten
  645.   else
  646.     goto testthree
  647.   end_if
  648.  
  649.  
  650. # ┌────────────────────────────────────┐
  651. # │ TOTAL between 9-13.  Too Bad.  -10 │
  652. # └────────────────────────────────────┘
  653. :loseten
  654. print "1H"
  655. print "hwYour total for this hand was: hb"
  656. print TOTAL
  657. print "   n\r\n"
  658. print "                                                           n\r\n"
  659. Print "hmSay goodbye to hr10 khm of your Credits for staying with 13 or less!n\r\n"
  660. print "1Hn                                                  n"
  661. pause
  662. adjust_user_credits -10
  663. add WINNINGS -10
  664. goto top
  665.  
  666.  
  667. # ┌────────────────────────────────────┐
  668. # │ Checking for TOTAL between 14 & 17 │
  669. # └────────────────────────────────────┘
  670. :testthree
  671. compare TOTAL 17
  672.   if_less_or_equal
  673.     goto gainfive
  674.   else
  675.     goto testfour
  676.   end_if
  677.  
  678.  
  679. # ┌─────────────────────────────────────────────────────┐
  680. # │ TOTAL between 14-17.  They played it SAFE.  +5      │
  681. # │ Since it cost 5 to play, they gain or lose nothing. │
  682. # └─────────────────────────────────────────────────────┘
  683. :gainfive
  684. print "1H"
  685. print "hwYour total for this hand was: hb"
  686. print TOTAL
  687. print "   n\r\n"
  688. print "                                                           n\r\n"
  689. print "hmSmart Move!  Playing it safe earned youhr 5 khm Credits.n\r\n"
  690. print "1Hn                                                  n"
  691. pause
  692. adjust_user_credits 5
  693. add WINNINGS 5
  694. goto top
  695.  
  696.  
  697. # ┌───────────────────────────────────────────┐
  698. # │ TOTAL between 18-20.  Ahh, a Winner!  +25 │
  699. # └───────────────────────────────────────────┘
  700. :testfour
  701. print "1H"
  702. print "hwYour total for this hand was: hb"
  703. print TOTAL
  704. print "   n\r\n"
  705. print "                                                           n\r\n"
  706. print "hmWow!  What luck @USER@!  You win r25 km Credits!!!!n\r\n"
  707. print "1Hn                                                  n"
  708. pause
  709. adjust_user_credits 25
  710. add WINNINGS 25
  711. goto top
  712.  
  713.  
  714. # ┌──────────────────────────────────────┐
  715. # │ TOTAL = 21  CHUCKLE BLACK JACK!  +50 │
  716. # └──────────────────────────────────────┘
  717. :super
  718. print "1H"
  719. print "hwYour total for this hand was: hb"
  720. print TOTAL
  721. print "   n\r\n"
  722. print "                                                           n\r\n"
  723. print "hmYou've hit 21-BLACKJACK you lucky hacker you!!!n\r\n"
  724. print "hyThe SysOp addsr 50 ky credits to your account with a scowl...n\r\n"
  725. print "1Hn                                                  n"
  726. pause
  727. adjust_user_credits 50
  728. add WINNINGS 50
  729. goto top
  730.  
  731.  
  732. # ┌────────────────────────────────────────────┐
  733. # │ Took 5 cards and the TOTAL was 21 or less? │
  734. # │ Not easy to do so reward them!  +150       │
  735. # └────────────────────────────────────────────┘
  736. :overfive
  737. print "1H"
  738. print "hwYour total for this hand was: hb"
  739. print TOTAL
  740. print "   n\r\n"
  741. print "                                                           n\r\n"
  742. print "hmYou took 5 cards and have 21 or less.  You get Bonus Credits!!!n\r\n"
  743. print "hyThe SysOp painfully addsr 150 ky credits to your account with a howl...n\r\n"
  744. print "1Hn                                                  n"
  745. pause
  746. adjust_user_credits 150
  747. add WINNINGS 150
  748. goto top
  749.  
  750.  
  751. # ┌───────────────────────────────┐
  752. # │ TOTAL over 21.  BUSTED!   -25 │
  753. # └───────────────────────────────┘
  754. :crap
  755. print "1H"
  756. print "hwYour total for this hand was: hb"
  757. print TOTAL
  758. print "   n\r\n"
  759. print "                                                           n\r\n"
  760. print "hmUh Oh . . . You've busted big time with a score of: hr"
  761. print TOTAL
  762. print ".n\r\n"
  763. print "hyThe SysOp pockets away r25 ky of your credits with a Chuckle...n\r\n"
  764. print "1Hn                                                  n"
  765. pause
  766. adjust_user_credits -25
  767. add WINNINGS -25
  768. goto top
  769.  
  770.  
  771. # ┌────────────────────────────────────────────────────────────────┐
  772. # │ If COUNT in a previous check indicated 5 cards had been drawn, │
  773. # │ this is the bigtest to see if they win big CREDITS.            │
  774. # └────────────────────────────────────────────────────────────────┘
  775. :bigtest
  776. compare TOTAL 21
  777.   if_less_or_equal
  778.     goto overfive
  779.   end_if
  780. compare TOTAL 21
  781.   if_greater
  782.     goto crap
  783.   end_if
  784.  
  785.  
  786. # ┌──────────────────────────────────────────────────┐
  787. # │ Leaving so soon?   Let's see if they won or lost │
  788. # │ and send them the appropriate feedback.          │
  789. # │ They started out with WINNINGS = 0               │
  790. # └──────────────────────────────────────────────────┘
  791. :leave
  792. compare WINNINGS 0
  793.   if_equal
  794.     goto nochange
  795.   end_if
  796. compare WINNINGS 0
  797.   if_greater
  798.     goto playerwon
  799.   else
  800.     goto userlost
  801.   end_if
  802.  
  803.  
  804. # ┌───────────────────────┐
  805. # │ No winings - No loss. │
  806. # └───────────────────────┘
  807. :nochange
  808. cls
  809. crlf
  810. crlf
  811. print "hyYou came out exactly hmEVENhy @USER@.n\r\n"
  812. crlf
  813. pause
  814. goto byebye
  815.  
  816.  
  817. # ┌────────────────────────────────────────┐
  818. # │ TOTAL above zero - Player Won Credits! │
  819. # └────────────────────────────────────────┘
  820. :playerwon
  821. cls
  822. crlf
  823. crlf
  824. print "hyYou've won a grand total of hm"
  825. print WINNINGS
  826. print " hyk Credits @USER@.n\r\n
  827. crlf
  828. pause
  829. goto byebye
  830.  
  831.  
  832. # ┌──────────────────────────────────────┐
  833. # │ TOTAL below 0 (negative)  User Lost! │
  834. # └──────────────────────────────────────┘
  835. :userlost
  836. cls
  837. crlf
  838. crlf
  839. print "hyYou lost a total of hm"
  840. print WINNINGS
  841. print " hyk Credits @USER@n\r\n"
  842. crlf
  843. pause
  844. goto byebye
  845.  
  846.  
  847. # ┌────────────────────────────────────────────────┐
  848. # │ Exiting Script.                                │
  849. # │ Keep track of Player's overall success in log. │
  850. # └────────────────────────────────────────────────┘
  851. :byebye
  852. log "$+ credit adjustment : "
  853. log "%s" WINNINGS
  854.